
local MainScene = class("MainScene", cc.load("mvc").ViewBase)

function MainScene:onCreate()
    ccui.Button:create()
        :setTitleText("ReplaceScene")
        :setTitleFontSize(14)
        :setTitleColor(cc.c3b(255, 0, 0))
        :move(display.cx, display.cy)
        :addTo(self)
        :addClickEventListener(function(event) -- 按钮的clicked事件处理
            local scene = import("app.views.SecondScene"):new() -- 原来是调用 lua_cocos2dx_Scene_constructor
            display.runScene(scene, "fade", 0.5, cc.c3b(255, 0, 0))
        end)
end

return MainScene
